var BASE_URL = "http://localhost:8080/motd2/resources/"
onload = function(){
    //dit word uit gevoerd als e pagina laad
    loadMessage();
};

function loadMessage(){
    var request =  new XMLHttpRequest();
    request.open("GET",BASE_URL+"motd");
    
    request.onload = function() {
        if (request.status === 200){
            document.getElementById("motd").innerHTML= request.responseText;
        }else{
            console.log("fout bij inladen bericht "+request.status + " - " + request.responseText)
        }
        console.log(request.status + " - " + request.responseText);
    }
   request.setRequestHeader("Accept","text/plain");
   request.send(null); 
}



